#!/bin/dash

base=http://mootools.net/download/get/
versions="1.2.5.1 1.2.5 1.2.4 1.2.3 1.2.2 1.2.2 1.2"
for v in $versions
do
  for q in "-jm. Minified" "-yc. Compressed" "-nc. Uncompressed"
  do
	set -- $q
	name="mootools-$v-core$1js"
	title="MooTools Core $v $2"
	echo "Checking $name $title"
	[ -f "$name" ] || curl -Lso "$name" "$base$name"
        [ -f "$name" ] && checksums add "$title" "$name"
  done
done

copyright="//MooTools More, <http://mootools.net/more>. Copyright (c) 2006-2009 Aaron Newton <http://clientcide.com/>, Valerio Proietti <http://mad4milk.net> & the MooTools team <http://mootools.net/developers>, MIT Style License."
for v in $versions
do
  for q in "jsmin Minified" "yui Compressed" "none Uncompressed"
  do
	set -- $q
	name="mootools-$v-more-$1.js"
	title="MooTools More $v $2"
	echo "Checking $name $title"
        set -x
	[ -f "$name" ] || curl -Ls -o "$name" \
                                   -F 'files[]=Core/More.js' \
                                   -F "compression=$q" \
                                   -F "version=$v" \
                                   -F "path=releases/mootools-more-$v" \
                                   -F "copyright=$copyright" \
                                   -F "type=more" \
                                   http://mootools.net/get
        set +x
        # [ -f "$name" ] && checksums add "$title" "$name"
        [ -f "$name" ] && echo checksums add "$title" "$name"
  done
done

# vim:se sts=4 sw=4 et ft=sh:
